import axios from 'axios'
import Nprogress from 'nprogress'
const Service = axios.create({
  baseURL: '/mock',
  timeout: 20000
})
Service.interceptors.request.use(config => {
  Nprogress.start()
  return config;
});
Service.interceptors.response.use(response => {
  Nprogress.done()
  return response.data
}, error => {
  // Do something with request error
  return new Promise(() => {})
});
export default Service